Repository navigation
feat: Configure or disable the FDv1 fallback per connection mode - #420
Draft
kinyoklion wants to merge 1 commit into
Draft
kinyoklion wants to merge 1 commit into
kinyoklion wants to merge 1 commit into
Conversation
ConnectionModeBuilder gains fdv1FallbackSynchronizer(), which takes an FDv1FallbackSynchronizerEntry from DataSystemComponents.fdv1FallbackSynchronizer() with a poll interval and a service endpoints override, and disableFdv1Fallback(), which leaves the mode with no FDv1 fallback. A mode that does neither keeps the SDK's default FDv1 fallback for that mode. The FDv1 fallback synchronizer polls the override's polling endpoint when one is given and the SDK's polling endpoint otherwise. Generated-by: termag
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A customized connection mode always got the SDK's default FDv1 fallback, with no way to change its poll interval or endpoint or to remove it.
ConnectionModeBuildernow has:fdv1FallbackSynchronizer(FDv1FallbackSynchronizerEntry): the entry comes fromDataSystemComponents.fdv1FallbackSynchronizer()and haspollIntervalMillis(int)andserviceEndpointsOverride(...), likePollingSynchronizerEntry. The fallback synchronizer polls the override's polling endpoint when one is given, and the SDK's polling endpoint otherwise.disableFdv1Fallback(): the mode has no FDv1 fallback.A mode that does neither keeps the default fallback for that mode, as before.
Disabling the fallback depends on launchdarkly/sdk-specs#281. The contract test "directive without FDv1 fallback configured halts the data system" needs the halting in #413 to pass with the fallback disabled; on main the SDK ignores the directive when a mode has no fallback.
Tested with new unit tests. The SDK's unit tests pass locally, on this branch and merged with #413.
Opened from termag